//HW1
//Training Camp


//1
/*

#include <iostream>
using namespace std;

int main(int argc, const char * argv[])
{
    double a, b, c;
    cout << "Enter two numbers: " << endl;
    cin >> a >> b;
    cout << "Enter third number: " <<endl;
    cin >> c;
    
    if (((c < a) && (c > b)) || ((c > a) && (c < b))) {
        cout << c << " is between " << a << " and " << b << endl;
    }
    else {
        cout << c << " is  not between " << a << " and " << b << endl;
    }
    
    return 0;
}



//2

#include <iostream>
using namespace std;

int main(int argc, const char * argv[])
{
    int x,y;
    cout << "Enter two different numbers:" << endl;
    cin >> x >> y;
    cout << x << "+" << y << "=" << x+y <<endl;
    cout << x << "-" << y << "=" << x-y <<endl;
    cout << x << "*" << y << "=" << x*y <<endl;
    cout << x << "/" << y << "=" << x/y <<endl;
    cout << x << "%" << y << "=" << x%y <<endl;
    
    return 0;
}



//3

#include <iostream>
using namespace std;

int main(int argc, const char * argv[])
{
    int a, b;
    cout << "Enter two different numbers: " << endl;
    cin >> a >> b;
    if (a !== b) {
        int c;
        c = a;
        a = b;
        b = c;
        cout << a << " " << b << endl;
    }
    else {
        cout << a << " " << b << endl;
    }
    return 0;
}

 //4

#include <iostream>
using namespace std;

int main(int argc, const char * argv[])
{
    int a, b;
    cout << "Enter two different numbers: " << endl;
    cin >> a >> b;
    if (a < b) {
        cout << a << " " << b << endl;
    }
    if (a > b) {
        cout << b << " " << a << endl;
    }
    if (a == b) {
        cout << "The numbers aren't different" << endl;
    return 0;
}
 
//5

#include <iostream>
using namespace std;

int main(int argc, const char * argv[])
{
    int a, b, c;
    cout << "Enter three different numbers: " << endl;
    cin >> a >> b >> c;
    if ((a >= b) && (b >= c)) {
        cout << a << " " << b << " " << c << " " << endl;
    }
    if ((a >= c) && (c >= b)) {
        cout << a << " " << c << " " << b << " " << endl;
    }
    if ((b >= a) && (a >= c)) {
        cout << b << " " << a << " " << c << " " << endl;
    }
    if ((b >= c) && (c >= a)) {
        cout << b << " " << c << " " << a << " " << endl;
    }
    if ((c >= b) && (b >= a)) {
        cout << c << " " << b << " " << a << " " << endl;
    }
    if ((c >= a) && (a >= b)) {
        cout << c << " " << a << " " << b << " " << endl;
    }
    return 0;
}


//6

#include <iostream>
using namespace std;

int main(int argc, const char * argv[])
{
    int a1, a2, a3;
    cin >> a1 >> a2 >> a3;
    int a4;
    a4 = a1;
    a1 = a2;
    a2 = a3;
    a3 = a4;
    cout << a1 << " " << a2 << " " << a3 << " " << endl;
    
}


//7

#include <iostream>
using namespace std;

int main(int argc, const char * argv[])
{
    //int hour;
    double haveMoney;
    bool amIHealthy;
    bool goingOut;
    bool buyMedicine;
    bool drinkingTea;
    bool coffee;
    if (amIHealthy == false) {
        goingOut = false;
        if (haveMoney > 0) {
            buyMedicine = true;
            cout << "Bolen sm i shte si kupq lekarstwa." << endl;
        }
        else {
            (goingOut = false) && (drinkingTea = true);
            cout << "Bolen sm, shte si stoq wkyshti i shte piq chai." << endl;
        }
    }
    else {
        if (haveMoney < 10) {
            coffee = true;
            cout << "Wsichko e prekrasno, imam pari za kafe i sm zdraw." << endl;
        }
    }
    }
*/

//dopylnitelna
//izwejda koq data shte byde na sledwashtiq den


#include <iostream>
using namespace std;

int main(int argc, const char * argv[])
{
    bool visokosnaGodina = false;
    int d, m, y;
    cout << "Enter a date / month / year is this format: 17 2 2004" << endl;
    cin >> d >> m >> y;
    
    if ((y % 4 == 0) && (y % 100 != 0)) {
        visokosnaGodina = true;
    }
    
    if (((d < 1) || (d > 31)) || ((m < 1) || (m >12))) {
        cout << "This is not a valid date" << endl;
    }
    
    if ((m == 2) && (d == 28) && visokosnaGodina) {
        d = 29;
        cout << "The date of the day after is: " << d << " " << m << " " << y << endl;
    
        if ((m == 2) && (d == 29) && visokosnaGodina) {
            d = 1;
            m = 3;
            cout << "The date of the day after is: " << d << " " << m << " " << y << endl;
        }
        else {
            d += 1;
            cout << "The date of the day after is: " << d << " " << m << " " << y << endl;
        }
        
        if ((m == 1) || (m == 3) || (m == 5) || (m == 7) || (m == 8) || (m == 10) || (m == 12)) {
            if (d == 31) {
            d = 1;
            m += 1;
                cout << "The date of the day after is: " << d << " " << m << " " << y << endl;
        }
    else {
        d += 1;
        cout << "The date of the day after is: " << d << " " << m << " " << y << endl;
    }
    
        if ((m == 4) || (m == 6) || (m == 9) || (m == 11)) {
            if (d == 30)
    {
        d = 1;
        m += 1;
        cout << "The date of the day after is: " << d << " " << m << " " << y << endl;
    }
    else {
        d += 1;
        cout << "The date of the day after is: " << d << " " << m << " " << y << endl;
    }
        }
    
    
       
    
    return 0;
}
}
}

























